package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import com.sky.result.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    List<ShoppingCart> queryByUserIdAndId(ShoppingCart shoppingCart);

    void update(ShoppingCart cart);

    void insert(ShoppingCart shoppingCart);

    @Select("select * from sky_take_out.shopping_cart where user_id = #{currentId}")
    List<ShoppingCart> queryAll(Long currentId);

    void deleteItem(ShoppingCart shoppingCart);

    void insertAll(List<ShoppingCart> shoppingCartList);
}
